import { sendRequest,sendNormalRequest } from "@/config"
import { AgreementType } from "@/type"

export const API = {


    login:(data:any)=> sendRequest({
        url:'login',
        method:'POST',
        data:data,
        loadingText:'登陆中...'
    }),

    getDefinedStrings:()=> sendRequest({
        url:'pub/common/getDefinedStrings',
        method:'POST',
        loadingText:'获取字符串...',
        needCache:true,
        responseType:'json'
    }),

    agreementContent:<AgreementType>(params:any)=>sendRequest<AgreementType>({
        url:'pub/hospital/agreementContent',
        method:'POST',
        data:params,
        loadingText:'获取协议...',
        needCache:true
    },{bindCacheKey:['id']}),

    testAxios:(params:any)=>{
        return sendNormalRequest({
            url:'pub/common/getDefinedStrings',
            method:'POST',
        })
    }

}
